import {
  defineAsyncComponent,
  markRaw,
} from 'vue';

const components = import.meta.glob("./*.vue");
const formatComs = Object.keys(components).reduce((prev, cur) => {
    const name = cur.split('./')[1].split('.vue')[0];
    prev[name] = markRaw(defineAsyncComponent(() => import(cur)));
    return prev;
}, {});
export default formatComs;